    <h1>Flexica</h1>
    <?php 
        echo FHtml::beginForm(); 
//        FHtml::hightlightErrorFields();
//        FHtml::setScenario('login');     
    ?>
    <h2 class="User">Login</h2>
    <?php
        $controller = Yii::app()->getController();
        //Show errors
        if (($errorMessage = $controller->Errors) != '<br/>')
            echo $errorMessage;
        if (isset($_GET['msg']) && ! empty($_GET['msg']))
        {
            echo $_GET['msg'];
            Yii::app()->user->returnUrl = Yii::app()->controller->createUrl('/Cms/admin/home');
        }
    ?>
    <div class="Input">
        <label for="User_Email">Email:</label><br/>
        <?php echo FHtml::activeTextField($user, 'Email', array('class' => 'TextBox')); ?>
    </div>
    <div class="Input">
        <label for="User_Password">Password:</label><br/>
        <?php echo FHtml::activePasswordField($user, 'Password', array('class' => 'TextBox')); ?>
    </div>
    <div class="Remember">
        <input type="checkbox" name="remember" id="remember" />
        <label><a onclick="CheckRemember();">Remember me on this computer</a></label>
    </div>
    <div class="Output">
        <?php 
//            if ($invalidStatus)
//            {
//                echo FHtml::link('Send activation email', $this->createUrl('/User/admin/user/sendActivation'), array('title' => 'Send activation'));    
//            } 
//            else
//            {
                echo FHtml::submitButton('Sign in', array('class' => 'Button'));
                echo FHtml::link('Forgot password', $this->createUrl('/Core/user/forgotPassword'), array('class' => 'ForgotPassword', 'title' => 'Forgot password'));
//            } 
        ?>
    </div>
    <script>
    function CheckRemember()
    {
        if ($('#remember').attr('checked'))
            $('#remember').attr('checked', false);
        else
            $('#remember').attr('checked', true);
    }
    </script>
    <?php echo FHtml::endForm(); ?>